/**
 * TODO - Need to find a way to calculate the number of spells gained in each "spell level"
 * per every "class level". ??? LevelMap<Entry<Integer level, Integer increment>> ???
 */

package org.icosagon.core.character;

import java.util.Vector;
import org.icosagon.core.character.traits.Ability;
import org.icosagon.core.character.traits.Skill;
import org.icosagon.core.dice.Die;
import org.icosagon.core.magic.SpellChart;

/**
 * 
 */
public class Class extends AbstractBase {
    private int level;
    private Die hitdie = new Die(6);
    private SpellChart spells = null;
    private Ability abilitymod = null;
    private int skillpoints = 0;
    private int baseattack = 0;
    private boolean varient = false;
    private Vector<Skill> skills = new Vector<Skill>();
    
    public Class(String name) {
        this.setName(name);
    }
    
    public int getLevel() {
        return level;
    }
    
    public void setLevel(int lvl) {
        this.level = lvl;
    }
    
    public Die getHitDie() {
        return this.hitdie;
    }
    
    public void setHitDie(Die die) {
        this.hitdie = die;
    }
    
    
    
    public boolean isSpellcaster() {
        if(spells == null || spells.isEmpty())
            return false;
        return true;
    }
    
    public void setAbilityModifier(Ability ability) {
        this.abilitymod = ability;
    }
    
    public Ability getAbilityModifier() {
        return this.abilitymod;
    }

    public void setSkillsPerLevel(int value) {
        this.skillpoints = value;
    }

    public int getSkillsPerLevel() {
        return this.skillpoints;
    }

    public void setBaseAttackBonus(int value) {
        this.baseattack = value;
    }

    public int getBaseAttackBonus() {
        return this.baseattack;
    }

    public void setVariant(boolean value) {
        this.varient = value;
    }

    public boolean isVariant() {
        return this.varient;
    }
}